home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mastering Web Site Development
/
Microsoft Mastering Web Site Development (Microsoft) (1997).iso
/
Media
/
Ch03
/
W03D015.cc2
< prev
next >
Wrap
Text File
|
1997-04-24
|
2KB
|
41 lines
0, In this demonstration, you will see how to use
5, Data View to modify the structure of a database. From
9, Data View, you can modify the design of existing
13, database items and create new items. To change the
17, design of a table, right-click the table and click
20, Design. Table information is displayed in a
24, grid. You can change the definition of existing
27, columns. For example, I'll change the data type of StudentID
32, to smallint. To add a new column, type the
36, information at the end of the grid. To change general
42, properties of your table, click the Properties icon on
46, the table toolbar. From the Table tab, you can set
51, constraints for the table. For example, the
54, Enrollment table has a constraint that the grade must be
58, between 0 and 4. I can edit this constraint or
63, click New to add a new constraint. From the
67, Relationship tab, you can specify how columns in this table
72, are related to other tables. From the Index/Keys
77, tab, you can create new indexes or modify attributes
82, of existing indexes. All of the changes you make to
90, a table are saved until you close the table
93, design window. To save changes to an SQL script, click
98, the Save Change Script icon. Visual InterDev
103, generates the SQL script and saves this information into
107, a text file. At a later date, you can use a tool,
112, such as ISQL, to apply this script to a database to
116, apply your changes. When you close the data design
122, window, you are prompted whether to apply your
124, changes. I'll click No, to not save my changes. If you
129, have made changes that would affect other tables
132, as well, you are prompted to save those
135, changes. I'll click No. In addition to modifying the table
140, design, you can modify a stored procedure. To modify a
144, stored procedure, right-click the procedure and
147, click Open. You can also create new items for a SQL
153, Server database. From the Insert menu, click New
157, Database Item, and select the type of item you want to
160, create. So in this demonstration, you have seen how
166, to use the Data View tab to modify the structure
170, of a database.
174, END